package com.zyh.service.impl;

import com.zyh.entity.Type;
import com.zyh.mapper.TypeMapper;
import com.zyh.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;

    @Override
    public void insert(Type type) {
        typeMapper.insert(type);
    }

    @Override
    public void deleteByTypeId(Integer typeId) {
        typeMapper.deleteByTypeId(typeId);
    }

    @Override
    public void deletesByTypeId(int[] ids) {
        typeMapper.deletesByTypeId(ids);
    }

    @Override
    public void updateByTypeId(Integer typeId) {
        typeMapper.updateByTypeId(typeId);
    }

    @Override
    public Type selectByTypeId(Integer typeId) {
        return typeMapper.selectByTypeId(typeId);
    }

    @Override
    public Type selectByTypeName(String typeName) {
        return typeMapper.selectByTypeName(typeName);
    }

    @Override
    public List<Type> selectTypes() {
        return typeMapper.selectTypes();
    }
}
